FROM ubuntu:14.04.1
#FROM 172.31.75.188/zhilink/ubuntu:14.04.1
#FROM 172.31.75.188/zhilink/ubuntu:14.04.1_v01
MAINTAINER hardyxia <1009254417@qq.com>
ENV REFRESHED_AT 2016-12-16

COPY nginx-1.11.7.tar.gz / 
#ADD http://nginx.org/download/nginx-1.11.7.tar.gz .


RUN apt-get -y update \
&& apt-get install vim lsof  gcc build-essential  libtool libpcre3 libpcre3-dev  zlib1g-dev openssl -y \
&& cd / \
&& tar xf nginx-1.11.7.tar.gz \
&& cd  nginx-1.11.7 && ./configure --prefix=/usr/local/nginx && make && make install \ 
&& echo "daemon off;" >> /usr/local/nginx/conf/nginx.conf \
&& cp /usr/local/nginx/sbin/nginx /usr/sbin \
&& rm -rf /nginx-1.11.7*

CMD /usr/sbin/nginx
#CMD ["/usr/local/nginx/sbin/nginx","-g","daemon off;"]
EXPOSE 80

